import { AppRouteRecordRaw } from '@/types/route'
import { shallowRef } from 'vue'
import Layout from '@/layout/index.vue'

export let assemblyRouter: AppRouteRecordRaw = {
  path: '/assembly',
  name: 'assembly',
  component: shallowRef(Layout),
  meta: {
    title: '组件管理',
    icon: 'icon-shouye_icon'
  },
  children: [
    {
      path: '/assembly/title',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/title.vue'),
      name: 'assemblyTitle',
      meta: { title: '标题' }
    },
    {
      path: '/assembly/loading',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/loading.vue'),
      name: 'assemblyLoading',
      meta: { title: 'Loading' }
    },
    {
      path: '/assembly/icon',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/icon.vue'),
      name: 'assemblyIcon',
      meta: { title: '图标' }
    },
    {
      path: '/assembly/scroll',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/scroll.vue'),
      name: 'assemblyScroll',
      meta: { title: '虚拟滚动条' }
    },
    {
      path: '/assembly/countDown',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/countDown.vue'),
      name: 'assemblyCountDown',
      meta: { title: '倒计时按钮' }
    },
    {
      path: '/assembly/descriptions',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/description.vue'),
      name: 'assemblyDescriptions',
      meta: { title: '详情列表' }
    },
    {
      path: '/assembly/drawer',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/drawer/index.vue'),
      name: 'assemblyDrawer',
      meta: { title: '抽屉组件' }
    },
    {
      path: '/assembly/modal',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/modal/index.vue'),
      name: 'assemblyModal',
      meta: { title: '弹窗组件' }
    },
    {
      path: '/assembly/form',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/form/index.vue'),
      name: 'assemblyForm',
      meta: { title: '基础表单' }
    },
    {
      path: '/assembly/table',
      component: () => import(/* webpackChunkName: "assembly" */ '@/views/assembly/table/index.vue'),
      name: 'assemblyTable',
      meta: { title: '基础表格' }
    }
  ]
}

export default assemblyRouter
